package com.itheima.mapper;

import com.itheima.pojo.TbCourse;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface TbCourseMapper {

    List<TbCourse> list(String code, String name, String applicablePerson, String subject, LocalDateTime createTime);
    @Insert("insert into tb_course (code, name, subject, price, applicable_person, info, create_time)" +
            "values (#{code},#{name},#{subject},#{applicablePerson},#{subject},#{createTime}) ")
    void save(TbCourse tbCourse);

    void deleteStudentById(List<Integer> ids);
    //根据ID查询员工信息
    @Select("select  *" +
            "from tb_course " +
            "where id = #{id}")
    TbCourse findById(Integer id);

    void update(TbCourse tbCourse);
}
